﻿using UnityEngine;

namespace Zero.Dialogue
{
    public class NPCTalkRewardExample : MonoBehaviour, ITalkReward
    {
        [Tooltip("对话后获得的物品")]
        public string rewardItem;
        [Tooltip("是否只获取一次")]
        public bool isOnce = true;

        public void ReceiveReward(BubbleCharacter talkTarget)
        {
            Debug.Log($"{talkTarget.name} 获得物品:{rewardItem}");
            if (isOnce) Destroy(this);
        }
    }
}